package cn.fj.hrm.dto;

import cn.fj.hrm.validation.IdenticalPassword;
import lombok.Data;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

@Data
@IdenticalPassword
public class TenantDto {
    @NotNull(message = "机构类型不能为空！")
    private Long tenantTypeId;

    @NotNull(message = "功能套餐不能为空！")
    private Long mealId;

    @NotBlank(message = "机构名称不能为空！")
    private String companyName;

    @NotBlank(message = "机构电话不能为空！")
    @Pattern(regexp = "^1[3-9]{1}[0-9]{9}$",message = "请输入正确的手机号！")
    private String companyNum;

    @NotBlank(message = "机构地址不能为空！")
    private String address;

    private String logo;

    /**
     * 员工用户名
     */
    @NotBlank(message = "管理员账户不能为空！")
    private String username;

    /**
     * 密码
     */
    @NotBlank(message = "管理员密码不能为空！")
    private String password;

    /**
     * 密码2
     */
    @NotBlank(message = "确认密码不能为空！")
    private String confirmPassword;

    /**
     * 电话
     */
    @NotBlank(message = "联系电话不能为空！")
    @Pattern(regexp = "^1[3-9]{1}[0-9]{9}$",message = "请输入正确的手机号！")
    private String tel;

    /**
     * 邮箱
     */
    @NotBlank(message = "邮箱不能为空！")
    @Email(message = "请输入正确的邮箱格式！")
    private String email;
}
